package com.neuedu.yyzx.controller;

import com.neuedu.yyzx.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
//允许跨域
@CrossOrigin
@RequestMapping("/admin")
public class adminController {
	@Autowired
	private AdminService adminService;
	@RequestMapping("/login")
	public Map<String,Object> login(String name,String pass){
		Map<String,Object> map = adminService.login(name,pass);
		return map;
	}
}
